﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local ="clr-namespace:XAudio2Controls"
                    xmlns:rhythm="clr-namespace:SynergyControls;assembly=SynergyControls">

    <!--Region: Filter Panel-->
    <Style TargetType="{x:Type local:FilterPanel}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:FilterPanel}">
                    <Grid x:Name="LayoutRoot" VerticalAlignment="Stretch">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <Grid                            
                            x:Name="LabelGrid" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
                            <Border BorderBrush="{DynamicResource controlBackgroundBrush}" BorderThickness=".8" Padding="2" Opacity=".5">
                                <StackPanel Background="{DynamicResource ControlBackgroundBrush}" Orientation="Horizontal">
                                    <ComboBox x:Name="PART_FilterTypeComboBox" HorizontalAlignment="Left" VerticalAlignment="Stretch" FontSize="12" />
                                    <CheckBox x:Name="PART_OnOffCheckbox" HorizontalAlignment="Right" VerticalAlignment="Center"/>
                                    <Label DataContext="{Binding ElementName=PART_Volume}" Content="{Binding Path=Value, StringFormat=\{0:F0\}, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Width="24" />
                                </StackPanel>
                            </Border>
                        </Grid>
                        <!---->
                        <Grid x:Name="PART_OneOverQ" Grid.Row="1" Grid.Column="0">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="60"/>
                                <ColumnDefinition Width="36"/>
                                </Grid.ColumnDefinitions>
                            <Border BorderThickness=".7" BorderBrush="{DynamicResource ControlBackgroundBrush}">
                            <rhythm:RadialControl x:Name="PART_RadialDial1"  SnapAngle="3.6" Grid.Column="0" Height="36" Width="36" HorizontalAlignment="Left"/>
                                </Border>
                            <Border Grid.Column="1" BorderThickness=".7" BorderBrush="{DynamicResource ControlBackgroundBrush}">
                            <StackPanel Orientation="Vertical">
                            <Label Content="1/Q"/>
                            <Label Name="OneOverQLabel" Content="{Binding Path=Angle, StringFormat=\{00:I\}}" DataContext="{Binding ElementName=PART_RadialDial1}"/>
                                </StackPanel>
                                </Border>
                            </Grid>
                        <!---->
                        <Grid x:Name="PART_Frequency" Grid.Row="2" Grid.Column="0">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="60"/>
                                <ColumnDefinition Width="36"/>
                            </Grid.ColumnDefinitions>
                            <Border BorderThickness=".7" BorderBrush="{DynamicResource ControlBackgroundBrush}">
                                <rhythm:RadialControl 
                                                            x:Name="PART_RadialDial2" 
                                                            SnapAngle="1" Grid.Column="0" 
                                                            Height="49" 
                                                            Width="49" 
                                                            HorizontalAlignment="Left"
                                                            RotationIsConstrained="True"
                                                            CounterClockwiseMostAngle="0"
                                                            ClockwiseMostAngle="359"
                                                            GradientLightColor="PaleGoldenrod"
                                                            GradientDarkColor="#4200FF00"/>
                            </Border>
                            <Border Grid.Column="1" BorderThickness=".7" BorderBrush="{DynamicResource ControlBackgroundBrush}">
                                <StackPanel Orientation="Vertical">
                                    <Label Content="Hz"/>
                                    <Label Content="{Binding Path=Angle, StringFormat=\{00:I\}}" DataContext="{Binding ElementName=PART_RadialDial2}"/>
                                </StackPanel>
                            </Border>
                        </Grid>
                        <!---->
                        <Grid Grid.Column="1" Grid.Row="1" Grid.RowSpan="2">
                            <Slider x:Name="PART_Volume" Value="1" Maximum="1.5" Minimum="-.5" Orientation="Vertical" VerticalAlignment="Stretch" TickFrequency="0.01" IsSnapToTickEnabled="True"/>
                            </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--EndRegion: Filter Panel-->

</ResourceDictionary>